<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" href="/static/index/css/swiper-3.4.2.min.css">
  <link rel="stylesheet" href="/static/index/css/GL.css">
  <script src="/static/index/js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>

  <script src="/static/index/js/swiper-3.4.2.jquery.min.js" type="text/javascript" charset="utf-8"></script>

  <script src="/static/index/js/swiper-3.4.2.min.js"></script>

</head>

<body>
  <div class="top_find">
    <div class="top_find_son">
      <img src="/static/index/img/top_find_logo.png" alt="">
      <div class="input_find">
        <input type="text" placeholder="卸妆水" />
        <a href="#"><img src="/static/index/img/img_09.png" /></a>
      </div>
    </div>
  </div>
  <ul class="left_floor">
    <li class="left_floor_xiang">享品质</li>
    <li class="left_floor_fu">服饰美妆</li>
    <li class="left_floor_jia">家电手机</li>
    <li class="left_floor_dian">电脑数码</li>
    <li class="left_floor_3C">3C运动</li>
    <li class="left_floor_ai">爱吃</li>
    <li class="left_floor_mu">母婴家居</li>
    <li class="left_floor_tu">图书汽车</li>
    <li class="left_floor_you">游戏金融</li>
    <li class="left_floor_lv">旅行健康</li>
    <li class="left_floor_hai">还没逛够</li>
    <li class="left_floor_ding">顶部</li>
  </ul>
  <header>
    <div class="head">
      <a href="#"><img src="/static/index/img/img_01.png" /></a>
      <p>X</p>
    </div>
    <!--头部-->
    <div class="header_head">
      <div class="header_head_box">

        <ul>
<!--          <li>-->
<!--            <a href="/登录页面\static/index.html">你好，请登录"${}"</a>-->
<!--          </li>-->
            <li>
                <a th:if="${session.loginUser != null}">欢迎，[[${session.loginUser.username}]]</a>
<!--                <a th:if="${session.loginUser == null}"  href="http://auth.gulimall.com/login.html">你好，请登录</a>-->
                <a th:if="${session.loginUser == null}"  href="http://footbathdoor.com/doorto/user/loginTo">你好，请登录</a>
              <a th:if="${session.loginUser != null}"  href="http://footbathdoor.com/doorto/user/loginTo">去登录</a>
                <!--<a href="http://auth.gulimall.com/login.html">欢迎,[[${session.loginUser == null?'':session.loginUser.username}]]</a>-->
            </li>
          <li>
            <a href="/注册页面\static/index.html" class="li_2">免费注册</a>
          </li>
          <span>|</span>
          <li>
            <a th:href="@{/center/list.html}">我的订单</a>
          </li>
          <li>
              <a th:href="@{/doorto/address/addressList}">管理我的收货地址</a>
          </li>
          <li>
            <a th:href="@{/doorto/index/getToTeacherPage}">加盟技师</a>
          </li>
          <li>
            <a th:href="@{/doorto/index/getToTeacherPage}">切换身份</a>
          </li>
          <li>
            <a th:href="@{/doorto/user/logout}">注销</a>
          </li>

        </ul>
      </div>
    </div>
    <!--搜索导航-->
    <div class="header_sous">
      <div class="header_ico">
        <div class="header_gw">
          <img src="/static/index/img/img_15.png" />
          <span><a href="/购物车\One_JDshop.html">我的购物车</a></span>
          <span>0</span>
        </div>
        <div class="header_ko">
          <p>购物车中还没有商品，赶紧选购吧！</p>
        </div>
      </div>

<!--      <form action="doorto/project/getProject" th:action="@{/IPage}"></form>-->
      <div class="row">
        <table class="table table-hover">
          <thead>
          <tr class="success">
            <th><input type="checkbox" id="myCheckbox" /></th>
            <th>项目编号</th>
            <th>项目图片</th>
            <th>项目简介</th>
            <th>项目价格</th>
            <th>已售数量</th>
            <th>项目名称</th>
            <th>服务时长</th>
<!--            <th>详细地址</th>-->
          </tr>
          </thead>
          数据显示
          <tr th:each="project:${projects}">
            <td><input type="checkbox" class="check"></td>
            <td th:text="${project.pid}"></td>
            <td th:text="${project.image}"></td>
            <td th:text="${project.introduction}"></td>
            <td th:text="${project.price}"></td>
            <td th:text="${project.sell}"></td>
            <td th:text="${project.name}"></td>
            <td th:text="${project.duration}"></td>
            <!-- 删除按钮，使用提交表单的方式 -->
            <td>
              <a th:href="@{/doorto/project/getTeacherByProjectId/{pid}(pid=${project.pid})}">选择技师</a>
<!--                <a th:href="@{/teacher/list/{id}(id=${project.id})}">选择技师</a>-->
            </td>
          </tr>

        </table>
      </div>


    </div>

      </div>
    </div>
  </header>
 
</body>
<script type="text/javascript">

  function deletePlayer(pid){
    $.ajax({
      url:"/doorto/project/getTeacherByProjectId/"+pid,    //请求的url地址
      //dataType:"text",   //返回格式为json
      type:"GET",   //请求方式
      // success:function(req){
      //   if(req=="true"){
      //     alert("查询成功")
      //     $("#"+id).parent().remove()
      //   }
      // },
    });
  }


  function search() {
    var keyword = $("#searchText").val()
    window.location.href = "http://search.gulimall.com/search.html?keyword=" + keyword;
  }
</script>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script type="text/javascript">
  $(document).ready(function () {
    $.ajax({
      url: "http://localhost:18080/doorto/project/getProject", // 替换为实际的 Java 后台接口 URL
      type: "GET", // 或 "POST" 取决于您的后台方法需求
      success: function (data) {
        // 处理后台返回的数据

        console.log(data);
      },
      error: function (error) {
        console.error("请求出错: ", error);
      }
    });
  });
</script>


<script type="text/javascript" src="/static/index/js/text.js"></script>
<script type="text/javascript" src="/static/index/js/header.js"></script>
<script type="text/javascript" src="/static/index/js/secend.js"></script>
<script type="text/javascript" src="/static/index/js/zz.js"></script>
<script type="text/javascript" src="/static/index/jsstatic/index.js"></script>
<script type="text/javascript" src="/static/index/js/left,top.js"></script>
<!--<script type="text/javascript" src="/static/index/js/catalogLoader.js"></script>-->
</html>
<!--      <div class="header_form_nav">-->
<!--        <ul>-->
<!--          <li>-->
<!--            <a href="#" class="aaaaa">满999减300</a>-->
<!--          </li>-->
<!--          <li>-->
<!--            <a href="#">金立S11</a>-->
<!--          </li>-->
<!--        </ul>-->
<!--      </div>-->
<!--      <nav>-->
<!--        <ul>-->
<!--          <li>-->
<!--            <div class="div-inline" id="image">项目图片</div>-->
<!--          </li>-->
<!--          <li>-->
<!--            <div class="div-inline" id="introduction">项目简介</div>-->
<!--          </li>-->
<!--          <li>-->
<!--            <div class="div-inline" id="price">项目价格</div>-->
<!--          </li>-->
<!--          <li>-->
<!--            <div class="div-inline" id="sell">已售数量</div>-->
<!--          </li>-->
<!--        </ul>-->
<!--        <div class="spacer">|</div>-->
<!--        <ul>-->
<!--          <li>-->
<!--            <div class="div-inline" id="name">项目名称</div>-->
<!--          </li>-->
<!--          <li>-->
<!--            <div class="div-inline" id="duration">服务时长</div>-->
<!--          </li>-->

<!--        </ul>-->

<!--      </nav>-->